<template>
  <div class="addEdit-block"
       :style='{"minHeight":"100vh","padding":"30px 30px 30px 0","fontSize":"14px","color":"#666","background":"#f4f8fb"}'>
    <el-form
        :style='{"border":"1px solid #e1e8ee","padding":"50px 10% 20px","overflow":"hidden","borderRadius":"0px","alignItems":"flex-start","flexWrap":"wrap","background":"rgba(255,255,255,1)","display":"flex","fontSize":"inherit"}'
        class="add-update-preview"
        ref="ruleForm"
        :model="ruleForm"
        :rules="rules"
        label-width="180px"
    >
      <template>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            class="input" v-if="type!='info'" label="患者姓名" prop="huanzhexingming">
          <el-input v-model="ruleForm.huanzhexingming" placeholder="患者姓名" clearable
                    :readonly="ro.huanzhexingming"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            v-else class="input" label="患者姓名" prop="huanzhexingming">
          <el-input v-model="ruleForm.huanzhexingming" placeholder="患者姓名" readonly></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            class="select" v-if="type!='info'" label="性别" prop="xingbie">
          <el-select :disabled="ro.xingbie" v-model="ruleForm.xingbie" placeholder="请选择性别">
            <el-option
                v-for="(item,index) in xingbieOptions"
                v-bind:key="index"
                :label="item"
                :value="item">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            v-else class="input" label="性别" prop="xingbie">
          <el-input v-model="ruleForm.xingbie"
                    placeholder="性别" readonly></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            class="input" v-if="type!='info'" label="年龄" prop="nianling">
          <el-input v-model.number="ruleForm.nianling" placeholder="年龄" clearable :readonly="ro.nianling"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            v-else class="input" label="年龄" prop="nianling">
          <el-input v-model="ruleForm.nianling" placeholder="年龄" readonly></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            class="input" v-if="type!='info'" label="身高" prop="shengao">
          <el-input v-model="ruleForm.shengao" placeholder="身高" clearable :readonly="ro.shengao"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            v-else class="input" label="身高" prop="shengao">
          <el-input v-model="ruleForm.shengao" placeholder="身高" readonly></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            class="input" v-if="type!='info'" label="体重" prop="tizhong">
          <el-input v-model="ruleForm.tizhong" placeholder="体重" clearable :readonly="ro.tizhong"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            v-else class="input" label="体重" prop="tizhong">
          <el-input v-model="ruleForm.tizhong" placeholder="体重" readonly></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            class="input" v-if="type!='info'" label="收缩压" prop="shousuoya">
          <el-input v-model="ruleForm.shousuoya" placeholder="收缩压" clearable :readonly="ro.shousuoya"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            v-else class="input" label="收缩压" prop="shousuoya">
          <el-input v-model="ruleForm.shousuoya" placeholder="收缩压" readonly></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            class="input" v-if="type!='info'" label="舒张压" prop="shuzhangya">
          <el-input v-model="ruleForm.shuzhangya" placeholder="舒张压" clearable :readonly="ro.shuzhangya"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            v-else class="input" label="舒张压" prop="shuzhangya">
          <el-input v-model="ruleForm.shuzhangya" placeholder="舒张压" readonly></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            class="input" v-if="type!='info'" label="血糖水平" prop="xuetangshuiping">
          <el-input v-model="ruleForm.xuetangshuiping" placeholder="血糖水平" clearable
                    :readonly="ro.xuetangshuiping"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            v-else class="input" label="血糖水平" prop="xuetangshuiping">
          <el-input v-model="ruleForm.xuetangshuiping" placeholder="血糖水平" readonly></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            class="input" v-if="type!='info'" label="LDL-C" prop="dimidudanbai">
          <el-input v-model="ruleForm.dimidudanbai" placeholder="LDL-C" clearable
                    :readonly="ro.dimidudanbai"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            v-else class="input" label="LDL-C" prop="dimidudanbai">
          <el-input v-model="ruleForm.dimidudanbai" placeholder="LDL-C" readonly></el-input>
        </el-form-item>


        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            class="input" v-if="type!='info'" label="HDL-C" prop="gaomidudanbai">
          <el-input v-model="ruleForm.gaomidudanbai" placeholder="HDL-C" clearable
                    :readonly="ro.gaomidudanbai"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            v-else class="input" label="HDL-C" prop="gaomidudanbai">
          <el-input v-model="ruleForm.gaomidudanbai" placeholder="HDL-C" readonly></el-input>
        </el-form-item>

        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            class="input" v-if="type!='info'" label="建议" prop="suggestion">
          <el-input v-model="ruleForm.suggestion" placeholder="建议" clearable :readonly="ro.suggestion"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"border":"0px solid #eee","padding":"0","margin":"0 0 20px 0","color":"inherit","borderRadius":"0px","display":"inline-block","width":"100%","fontSize":"inherit"}'
            v-else class="input" label="建议" prop="suggestion">
          <el-input v-model="ruleForm.suggestion" placeholder="建议" readonly></el-input>
        </el-form-item>


      </template>
      <el-form-item
          :style='{"padding":"10px 0 20px","margin":"30px 0","alignItems":"center","textAlign":"left","display":"block","width":"100%","clear":"both","perspective":"320px","-webkitPerspective":"320px","fontSize":"48px","justifyContent":"flex-start"}'
          class="btn">
        <el-button class="btn3" v-if="type!='info'" type="success" @click="onSubmit">
          <span class="icon iconfont icon-tijiao16"
                :style='{"margin":"0 2px","fontSize":"18px","color":"inherit","display":"none"}'></span>
          保存
        </el-button>
        <el-button class="btn4" v-if="type!='info'" type="success" @click="back()">
          <span class="icon iconfont icon-quxiao09"
                :style='{"margin":"0 2px","fontSize":"18px","color":"inherit","display":"none"}'></span>
          取消
        </el-button>
        <el-button class="btn5" v-if="type=='info'" type="success" @click="back()">
          <span class="icon iconfont icon-fanhui01"
                :style='{"margin":"0 2px","fontSize":"18px","color":"inherit","display":"none"}'></span>
          返回
        </el-button>
      </el-form-item>
    </el-form>


  </div>
</template>
<script>
import {isIntNumer,} from "@/utils/validate";

export default {
  data() {
    var validateIntNumber = (rule, value, callback) => {
      if (!value) {
        callback();
      } else if (!isIntNumer(value)) {
        callback(new Error("请输入整数"));
      } else {
        callback();
      }
    };
    return {
      id: '',
      type: '',


      ro: {
        huanzhexingming: false,
        xingbie: false,
        nianling: false,
        shengao: false,
        tizhong: false,
        shousuoya: false,
        shuzhangya: false,
        xuetangshuiping: false,
        dimidudanbai: false,
        gaomidudanbai: false, suggestion: false
      },


      ruleForm: {
        huanzhexingming: '',
        xingbie: '',
        nianling: '',
        shengao: '',
        tizhong: '',
        shousuoya: '',
        shuzhangya: '',
        xuetangshuiping: '',
        dimidudanbai: '',
        gaomidudanbai: '',
        suggestion: ''
      },

      xingbieOptions: [],


      rules: {
        huanzhexingming: [],
        xingbie: [],
        nianling: [
          {validator: validateIntNumber, trigger: 'blur'},
        ],
        shengao: [],
        tizhong: [],
        shousuoya: [],
        shuzhangya: [],
        xuetangshuiping: [],
        dimidudanbai: [],
        suggestion: [],
        gaomidudanbai: [],
      }
    };
  },
  props: ["parent"],
  computed: {},
  components: {},
  created() {
  },
  methods: {

    // 下载
    download(file) {
      window.open(`${file}`)
    },
    // 初始化
    init(id, type) {
      if (id) {
        this.id = id;
        this.type = type;
      }
      if (this.type == 'info' || this.type == 'else') {
        this.info(id);
      } else if (this.type == 'logistics') {
        this.logistics = false;
        this.info(id);
      } else if (this.type == 'cross') {
        var obj = this.$storage.getObj('crossObj');
        for (var o in obj) {
          if (o == 'huanzhexingming') {
            this.ruleForm.huanzhexingming = obj[o];
            this.ro.huanzhexingming = true;
            continue;
          }
          if (o == 'xingbie') {
            this.ruleForm.xingbie = obj[o];
            this.ro.xingbie = true;
            continue;
          }
          if (o == 'nianling') {
            this.ruleForm.nianling = obj[o];
            this.ro.nianling = true;
            continue;
          }
          if (o == 'shengao') {
            this.ruleForm.shengao = obj[o];
            this.ro.shengao = true;
            continue;
          }
          if (o == 'tizhong') {
            this.ruleForm.tizhong = obj[o];
            this.ro.tizhong = true;
            continue;
          }
          if (o == 'shousuoya') {
            this.ruleForm.shousuoya = obj[o];
            this.ro.shousuoya = true;
            continue;
          }
          if (o == 'shuzhangya') {
            this.ruleForm.shuzhangya = obj[o];
            this.ro.shuzhangya = true;
            continue;
          }
          if (o == 'xuetangshuiping') {
            this.ruleForm.xuetangshuiping = obj[o];
            this.ro.xuetangshuiping = true;
            continue;
          }
          if (o == 'dimidudanbai') {
            this.ruleForm.dimidudanbai = obj[o];
            this.ro.dimidudanbai = true;
            continue;
          }
          if (o == 'suggestion') {
            this.ruleForm.suggestion = obj[o];
            this.ro.suggestion = true;
            continue;
          }
          if (o == 'gaomidudanbai') {
            this.ruleForm.gaomidudanbai = obj[o];
            this.ro.gaomidudanbai = true;
            continue;
          }
        }
      }
      // 获取用户信息
      this.$http({
        url: `${this.$storage.get('sessionTable')}/session`,
        method: "get"
      }).then(({data}) => {
        if (data && data.code === 0) {
          var json = data.data;
        } else {
          this.$message.error(data.msg);
        }
      });
      this.xingbieOptions = "男,女".split(',')

    },
    // 多级联动参数

    info(id) {
      this.$http({
        url: `gaoxueyafenxi/info/${id}`,
        method: "get"
      }).then(({data}) => {
        if (data && data.code === 0) {
          this.ruleForm = data.data;
          //解决前台上传图片后台不显示的问题
          let reg = new RegExp('../../../upload', 'g')//g代表全部
        } else {
          this.$message.error(data.msg);
        }
      });
    },


    // 提交
    onSubmit() {
      var objcross = this.$storage.getObj('crossObj');
      //更新跨表属性
      var crossuserid;
      var crossrefid;
      var crossoptnum;
      if (this.type == 'cross') {
        var statusColumnName = this.$storage.get('statusColumnName');
        var statusColumnValue = this.$storage.get('statusColumnValue');
        if (statusColumnName != '') {
          var obj = this.$storage.getObj('crossObj');
          if (statusColumnName && !statusColumnName.startsWith("[")) {
            for (var o in obj) {
              if (o == statusColumnName) {
                obj[o] = statusColumnValue;
              }
            }
            var table = this.$storage.get('crossTable');
            this.$http({
              url: `${table}/update`,
              method: "post",
              data: obj
            }).then(({data}) => {
            });
          } else {
            crossuserid = this.$storage.get('userid');
            crossrefid = obj['id'];
            crossoptnum = this.$storage.get('statusColumnName');
            crossoptnum = crossoptnum.replace(/\[/, "").replace(/\]/, "");
          }
        }
      }
      this.$refs["ruleForm"].validate(valid => {
        if (valid) {
          if (crossrefid && crossuserid) {
            this.ruleForm.crossuserid = crossuserid;
            this.ruleForm.crossrefid = crossrefid;
            let params = {
              page: 1,
              limit: 10,
              crossuserid: this.ruleForm.crossuserid,
              crossrefid: this.ruleForm.crossrefid,
            }
            this.$http({
              url: "gaoxueyafenxi/page",
              method: "get",
              params: params
            }).then(({
                       data
                     }) => {
              if (data && data.code === 0) {
                if (data.data.total >= crossoptnum) {
                  this.$message.error(this.$storage.get('tips'));
                  return false;
                } else {
                  this.$http({
                    url: `gaoxueyafenxi/${!this.ruleForm.id ? "save" : "update"}`,
                    method: "post",
                    data: this.ruleForm
                  }).then(({data}) => {
                    if (data && data.code === 0) {
                      this.$message({
                        message: "操作成功",
                        type: "success",
                        duration: 1500,
                        onClose: () => {
                          this.parent.showFlag = true;
                          this.parent.addOrUpdateFlag = false;
                          this.parent.gaoxueyafenxiCrossAddOrUpdateFlag = false;
                          this.parent.search();
                          this.parent.contentStyleChange();
                        }
                      });
                    } else {
                      this.$message.error(data.msg);
                    }
                  });

                }
              } else {
              }
            });
          } else {
            this.$http({
              url: `gaoxueyafenxi/${!this.ruleForm.id ? "save" : "update"}`,
              method: "post",
              data: this.ruleForm
            }).then(({data}) => {
              if (data && data.code === 0) {
                this.$message({
                  message: "操作成功",
                  type: "success",
                  duration: 1500,
                  onClose: () => {
                    this.parent.showFlag = true;
                    this.parent.addOrUpdateFlag = false;
                    this.parent.gaoxueyafenxiCrossAddOrUpdateFlag = false;
                    this.parent.search();
                    this.parent.contentStyleChange();
                  }
                });
              } else {
                this.$message.error(data.msg);
              }
            });
          }
        }
      });
    },
    // 获取uuid
    getUUID() {
      return new Date().getTime();
    },
    // 返回
    back() {
      this.parent.showFlag = true;
      this.parent.addOrUpdateFlag = false;
      this.parent.gaoxueyafenxiCrossAddOrUpdateFlag = false;
      this.parent.contentStyleChange();
    },
  }
};
</script>
<style lang="scss" scoped>
.amap-wrapper {
  width: 100%;
  height: 500px;
}

.search-box {
  position: absolute;
}

.el-date-editor.el-input {
  width: auto;
}

.add-update-preview .el-form-item /deep/ .el-form-item__label {
  padding: 0 10px 0 0;
  color: #333;
  font-weight: 600;
  display: inline-block;
  width: 180px;
  font-size: inherit;
  line-height: 40px;
  text-align: right;
}

.add-update-preview .el-form-item /deep/ .el-form-item__content {
  margin-left: 180px;
}

.add-update-preview .el-input /deep/ .el-input__inner {
  padding: 0 12px;
  color: inherit;
  font-size: 14px;
  border-color: #e1e8ee;
  border-radius: 0px;
  box-shadow: 0 0 0px rgba(64, 158, 255, .5);
  outline: none;
  background: #f5f8fa;
  width: auto;
  border-width: 1px;
  border-style: solid;
  min-width: 350px;
  height: 32px;
}

.add-update-preview .el-input-number /deep/ .el-input__inner {
  text-align: left;
  padding: 0 12px;
  color: inherit;
  font-size: 14px;
  border-color: #e1e8ee;
  border-radius: 0px;
  box-shadow: 0 0 0px rgba(64, 158, 255, .5);
  outline: none;
  background: #f5f8fa;
  width: auto;
  border-width: 1px;
  border-style: solid;
  min-width: 350px;
  height: 32px;
}

.add-update-preview .el-input-number /deep/ .el-input-number__decrease {
  display: none;
}

.add-update-preview .el-input-number /deep/ .el-input-number__increase {
  display: none;
}

.add-update-preview .el-select /deep/ .el-input__inner {
  padding: 0 10px;
  color: inherit;
  font-size: 14px;
  border-color: #e1e8ee;
  border-radius: 0px;
  box-shadow: 0 0 0px rgba(64, 158, 255, .5);
  outline: none;
  background: #f5f8fa;
  width: auto;
  border-width: 1px;
  border-style: solid;
  min-width: 350px;
  height: 32px;
}

.add-update-preview .el-date-editor /deep/ .el-input__inner {
  padding: 0 10px 0 30px;
  color: inherit;
  font-size: 14px;
  border-color: #e1e8ee;
  border-radius: 0px;
  box-shadow: 0 0 0px rgba(64, 158, 255, .5);
  outline: none;
  background: #f5f8fa;
  width: auto;
  border-width: 1px;
  border-style: solid;
  min-width: 350px;
  height: 32px;
}

.add-update-preview /deep/ .el-upload--picture-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  width: auto;
  height: auto;
  line-height: initial;
  vertical-align: middle;
}

.add-update-preview /deep/ .upload .upload-img {
  cursor: pointer;
  color: #c0cfdc;
  object-fit: cover;
  font-size: 24px;
  border-color: #e1e8ee;
  line-height: 90px;
  border-radius: 16px;
  background: #f5f8fa;
  width: 90px;
  border-width: 1px;
  border-style: solid;
  text-align: center;
  height: 90px;
}

.add-update-preview /deep/ .el-upload-list .el-upload-list__item {
  cursor: pointer;
  color: #c0cfdc;
  object-fit: cover;
  font-size: 24px;
  border-color: #e1e8ee;
  line-height: 90px;
  border-radius: 16px;
  background: #f5f8fa;
  width: 90px;
  border-width: 1px;
  border-style: solid;
  text-align: center;
  height: 90px;
}

.add-update-preview /deep/ .el-upload .el-icon-plus {
  cursor: pointer;
  color: #c0cfdc;
  object-fit: cover;
  font-size: 24px;
  border-color: #e1e8ee;
  line-height: 90px;
  border-radius: 16px;
  background: #f5f8fa;
  width: 90px;
  border-width: 1px;
  border-style: solid;
  text-align: center;
  height: 90px;
}

.add-update-preview .el-textarea /deep/ .el-textarea__inner {
  padding: 12px;
  color: inherit;
  font-size: 14px;
  border-color: #e1e8ee;
  min-height: 120px;
  border-radius: 0px;
  box-shadow: 0 0 0px rgba(64, 158, 255, .5);
  outline: none;
  background: #f5f8fa;
  width: auto;
  border-width: 1px;
  border-style: solid;
  min-width: 550px;
  height: auto;
}

.add-update-preview .btn .btn1 {
  border: 1px solid rgba(53, 184, 224, 0.1);
  cursor: pointer;
  padding: 0 10px;
  margin: 0px 4px;
  color: #fff;
  display: inline-block;
  font-size: 12px;
  line-height: 24px;
  border-radius: 2px;
  outline: none;
  background: #03a9f4;
  width: auto;
  height: 26px;
}

.add-update-preview .btn .btn1:hover {
  box-shadow: 0px 0px 9px #ccc;
  transform: translate3d(0px, 0px, 0px);
  opacity: 0.8;
}

.add-update-preview .btn .btn2 {
  border: 1px solid rgba(24, 138, 226, 0.1);
  cursor: pointer;
  border-radius: 2px;
  padding: 0 10px;
  margin: 0px 4px;
  outline: none;
  color: #fff;
  background: #6c757d;
  width: auto;
  font-size: 12px;
  line-height: 24px;
  height: 26px;
}

.add-update-preview .btn .btn2:hover {
  box-shadow: 0px 0px 9px #ccc;
  transform: translate3d(0px, 0px, 0px);
  opacity: 0.8;
}

.add-update-preview .btn .btn3 {
  border: 0px solid #0260ad;
  cursor: pointer;
  border-radius: 2px;
  padding: 0 20px;
  margin: 0px 4px;
  outline: none;
  color: #fff;
  background: #78bcee;
  width: auto;
  font-size: 12px;
  line-height: 24px;
  height: 26px;
}

.add-update-preview .btn .btn3:hover {
  box-shadow: 0px 0px 9px #ccc;
  transform: translate3d(0px, 0px, 0px);
  opacity: 0.8;
}

.add-update-preview .btn .btn4 {
  border: 0px solid rgba(126, 96, 16, .2);
  cursor: pointer;
  border-radius: 2px;
  padding: 0 20px;
  margin: 0px 4px;
  outline: none;
  color: #fff;
  background: #7dc855;
  width: auto;
  font-size: 12px;
  line-height: 24px;
  height: 26px;
}

.add-update-preview .btn .btn4:hover {
  box-shadow: 0px 0px 9px #ccc;
  transform: translate3d(0px, 0px, 0px);
  background: rgba(28, 132, 198, 1);
  opacity: 1;
}

.add-update-preview .btn .btn5 {
  border: 0px solid rgba(114, 123, 132, 0.1);
  cursor: pointer;
  border-radius: 2px;
  padding: 0 20px;
  margin: 4px;
  outline: none;
  color: #fff;
  background: #fcce54;
  width: auto;
  font-size: 12px;
  line-height: 24px;
  height: 26px;
}

.add-update-preview .btn .btn5:hover {
  box-shadow: 0px 0px 9px #ccc;
  transform: translate3d(0px, 0px, 0px);
  opacity: 1;
}
</style>
